const router = require('koa-router')();
const user = require('../modules/check');

//获取数据
router.get('/checkmes',async (ctx,next) => {
    ctx.body = await user.selectCheckmes();  
})
//增加数据
router.post('/checkmes',async (ctx,next) => {
    ctx.body = await user.addCheckmes(ctx.request.body)
})
//删除数据
router.delete('/checkmes/:check_id',async (ctx,next) => {
    ctx.body = await user.deleteCheckmes(ctx.params);
})
//修改数据
router.put('/checkmes',async (ctx,next) => {
    ctx.body = await user.putCheckmes(ctx.request.body)
})

module.exports = router;